<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<link rel="icon" href="../img/system/icon/Exchange-logo.jpg" type="image/x-icon">
		<title>易置-物品分类页</title>
		<link rel="stylesheet" type="text/css" href="../css/goods_all.css"/>
	</head>
	<body>
		<div class="wrapper">
			<!--顶两侧到头-->
			<div class="inside">
				<!--顶部-->
				<div class="header">
					<span id="address">当前位置：首页推荐信息，注册登录后获取更多定位信息
						<!--<form action="" method="post">
							<input type="text" name="school_address" id="school_address" value="" />
							<input type="submit" id="school_address_submit" value="&nbsp;确定&nbsp;"/> 
						</form>-->
					</span>
					<!--<ul>
						<li>您好，请</li>
						<li><a href="login.html">登录</a></li>
						<li><a href="login.html">免费注册</a>&nbsp;&nbsp;|</li>
						<li><a href="login.html">消息</a></li>
					</ul>-->
				</div>
			</div>
			<div class="inside02">
				<!--logo-->
				<div class="header_logo">
					<a href="index.php"><img class="logo" src="../img/system/icon/Exchange-logo.jpg" /></a>
					<span>易置</span>
					<form action="goods_all_search_onlogin.php" method="post">
						<input type="text" name="goods_name" id="search_header" />
						<!--<div class="search">搜索</div>-->
						<input class="search" type="submit" name="submit" value="搜索"/>
					</form>
				</div>
				<!--导航栏-->
				<div class="nav">
					<!--<a href="#fenlei">-->
					<div class="nav_first">
						<a href="#"><span>物品分类</span></a>
					</div>
					<!--</a>-->
					<ul>
						<li class="home"><a href="index.php">首页</a></li>
					</ul>
				</div>
			</div>
			<br /><br />
			<div class="inside04">
				<div class="goods">
					<?php
							$goods_type=$_POST['goods_type'];
							$db=@mysqli_connect('localhost','root','123456','db_exchange')//利用mysqli_connect()连接到数据库
							or die("无法连接到数据库");
							mysqli_query($db,"set names 'utf8'");
							$q="SELECT * FROM tb_goods WHERE goods_type='".$goods_type."'";
							$result=mysqli_query($db,$q);//利用mysqli_query()来执行上面的SQL文件，将结果返回给$result
							if ($result->num_rows > 0) {
  							// 输出数据
  								while($row = $result->fetch_assoc()) {
  								$goods_id=$row["goods_id"];	
   								$img_pathi=$row["img_path"];
   								$goods_namei=$row["goods_name"];
   								$goods_moneyi=$row["goods_money"];
							?>
					<div class="good01">
						<!--物品简项表单提交部分-->
						<form action="goods_details.php" method="post">
							<input style="display: none;" type="text" name="goods_id" value="<?php echo $goods_id; ?>" />
							<input id="bt_submit" type="submit" value=""/>
						</form>
						<img class="good01_img" src="../img/system/goods/<?php echo $img_pathi; ?>"/>
						<div class="good01_title">
							<span id="name"><?php echo $goods_namei; ?></span>
							<!--<span id="money01">￥:3000.00</span>-->
							<span id="money02">￥<?php echo $goods_moneyi; ?>.00</span>
						</div>
					</div>
					<?php
							}
						}
						mysqli_close($db);
					?>
				</div>
				<!--分页-->
				<div class="page">
					<div class="pages">
						<a href="#"><</a>
						<a href="#">1</a>
						<a href="#">2</a>
						<a href="#">3</a>
						<a href="#">4</a>
						<a href="#">5</a>	
						<a href="#">6</a>	
						<a href="#">...</a>
						<a href="#">10</a>
						<a href="#">></a>	
					</div>
				</div>
				<!--底部-->
				<div class="footer">
					<div class="one">
						<span class="buy">购物指南</span>
						<span>购买流程</span>
						<span>常见问题</span>
						<span>联系客服</span>
						<span>物品发布</span>
						<span>发布问题</span>
					</div>
					<div class="one">
						<span class="buy">配送方式</span>
						<span>上门自提</span>
						<span>快递配送</span>
						<span>送货上门</span>
					</div>
					<div class="one">
						<span class="buy">支付方式</span>
						<span>在线支付</span>
						<span>货到付款</span>
						<span>分期付款</span>
					</div>
					<div class="one">
						<span class="buy">售后服务</span>
						<span>售后政策</span>
						<span>退款说明</span>
						<span>取消订单</span>
					</div>
				</div>
				<div class="footer02">
					<ul>
						<li>关于我们&nbsp;&nbsp;&nbsp;&nbsp;</li>
						<li>联系我们&nbsp;&nbsp;&nbsp;&nbsp;</li>
						<li>诚招英才&nbsp;&nbsp;&nbsp;&nbsp;</li>
						<li>论坛&nbsp;&nbsp;&nbsp;&nbsp;</li>
						<li>友情链接&nbsp;&nbsp;&nbsp;&nbsp;</li>
						<li>相关产品</li>
					</ul>
				</div>
				<div class="footer02_about">
					<hr />
					<ul>
						<li>用户协议&nbsp;&nbsp;|&nbsp;&nbsp;</li>
						<li>隐藏协议&nbsp;&nbsp;|&nbsp;&nbsp;</li>
						<li>Copyright © 2019  易置开发团队版权所有</li>
					</ul>
				</div>
			</div>
		</div>
	<script src="../js/jquery-3.4.1.js"></script>
    <script src="../js/goods_all.js"></script>
	</body>
</html>